package cn.javasm.config;

import org.springframework.context.annotation.Configuration;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * @author:27chen
 * @className:Config
 * @dat:2023/10/24 15:55
 * @version:0.1
 * @since:jdk11
 */
//@Configuration
//public class Config extends WebSecurityConfigurerAdapter {
//
//    @Override
//    protected void configure(HttpSecurity http) throws Exception {
//        http.authorizeRequests() //开启认证
//                .antMatchers("/login666.html").permitAll()
//                .anyRequest()
//                .authenticated(); // 都需要认证才能访问
//
//        http.formLogin(); // 开启表单认证
////                loginPage("/shangma.html");// 本质上是修改了LoginUrlAuthenticationEntryPoint构造函数中的重定向地址
//
//        http.exceptionHandling().authenticationEntryPoint(new MyEntryPoint());// 替换系统的entryPoint,使用自定义的
//    }
//    }




